<?php
	class pages{
		//分页
		public function page($obj){
			$data = array(
				'count' => ceil($obj -> count()/10),//总页数
				'page' => intval($_GET['page'])?intval($_GET['page']):1//当前页数
			); 
			VIEW::assign(array('pages' => $data));
			return $obj -> get_carinfo_list(intval($_GET['page'])?intval($_GET['page'])-1:0);//当前数据
		}
		
	}
?>